//888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
//
//	File		 :	ComboFormattedOutput.cpp
//	Contents	 :	Source file for class CComboFormattedOutput
//	Descrition	 :	Proof of concept: combines both CHTML and CRTF FormattedOutput
//	Creation Date:	22/12/1999
//	Last Modified:	23/12/1999	lg
//	tabs width	 :	every 4 characters
//
//888888888888888888888888888888888888888888888888888888888888888888888888888888888888888

#if !defined(COMBOFORMATTEDOUTPUT_H)
#define COMBOFORMATTEDOUTPUT_H


#include "rtfformattedoutput.h"
#include "htmlformattedoutput.h"


//_______________________________________________________________________________________
//
//	CComboFormattedOutput
//
//		Produces formatted text in the Microsoft Rich Text Format
//							and in the HTML Format
//
//		Generally, the only necessary function calls are (in order):
//
//			1) AddFormat/AddFormats:
//				adds all the text formats which will be used throughout
//
//			2) BeginHeader()
//
//			3) AddText, AddNewLine
//			   SetFormat
//				switches to one of the formats from AddFormat(s)
//
//			5) EndFooter()
//
//			6) 	CopytoClipboard() or
//				GetStreamedText() or
//				CopyToWord()	  or
//				AddToWordDocument()
//_______________________________________________________________________________________
class CComboFormattedOutput : public CRTFFormattedOutput, public CHTMLFormattedOutput
{
protected:
	virtual void			DoBeginHeader();
	virtual void			DoEndFooter();
#ifdef _MFC_VER	// mfc specific code to follow
	unsigned   				GetClipboardFormat(unsigned i);
#endif
public:
							CComboFormattedOutput(unsigned ts = 100,
								const std::string& tf = "Courier New",
								bool useHTMLStyleSheet = false,
								const std::string& htmlStylesRoot = "lg",
								bool ignoreFont = true):
								CFormattedOutput(ts, tf),
								CRTFFormattedOutput(ts, tf),
								CHTMLFormattedOutput(ts, tf, useHTMLStyleSheet, htmlStylesRoot, ignoreFont)
								{}
	const std::string&		GetStreamedText(unsigned i);
	unsigned   				GetFileFormatCounts();
#ifdef _MFC_VER	// mfc specific code to follow
	const std::string&		GetClipStreamedText(unsigned i);
#endif
	void					StreamQueuedText();
	void					AddNewLine();
	void					AddNewLineAndHalf();
	void					AddDoubleNewLines();
};



#endif // !defined(COMBOFORMATTEDOUTPUT_H)
